package com.ctsi.commons.util.async;

 

public enum TaskState {
	SUCCESS("SUCCESS"),UNCANCELLABLE("UNCANCELLABLE");	
	
	TaskState(){}
	TaskState(String type){}
	
	public String getTaskState (){
		switch(this.ordinal()){
			case 0:
				return "SUCCESS";
			case 1:
				return "UNCANCELLABLE";
			default:
				throw new RuntimeException("error ordinal,must <=1");
		}
	}
	
	public TaskState getTaskState(final String state){
		return TaskState.valueOf(state);
	}
}
